package cn.edu.scau.dormitory_management_system.service.impl;

import cn.edu.scau.dormitory_management_system.dao.RepairDao;
import cn.edu.scau.dormitory_management_system.entity.RepairEntity;
import cn.edu.scau.dormitory_management_system.service.RepairService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;



@Service("repairService")
public class RepairServiceImpl extends ServiceImpl<RepairDao, RepairEntity> implements RepairService {

    @Override
    public boolean insetRepair(RepairEntity repairEntity) {
        return this.baseMapper.insert(repairEntity)>0;
    }

    @Override
    public int stuInsertRepair(String tel, String dormName, String type, String content) {

        return this.baseMapper.stuInsertRepair(tel,dormName,type,content);
    }

    @Override
    public boolean updateRepair(RepairEntity repairEntity) {
        return this.baseMapper.updateById(repairEntity)>0;
    }
}